/*
 * @Author: KKKKKK
 * @Date: 2021-01-10 12:08:35
 * @LastEditors: KKKKKK
 * @LastEditTime: 2021-01-10 12:08:35
 */
import axios from './config'
import url from './url'
const baseUrl = process.env.VUE_APP_BASE_URL

/* 纠纷 */
// 新增纠纷
const disputeCreate = (params) => axios.post(baseUrl + url.dispute.create, params)

// 删除纠纷
const disputeDelete = (id) => axios.delete(baseUrl + url.dispute.delete + `/${id}`)

// 修改纠纷
const disputeUpdate = (params, id) => axios.post(baseUrl + url.dispute.update + `/${id}`, params)

// 获取某个纠纷
const disputeLoad = (id) => axios.get(baseUrl + url.dispute.load + `/${id}`)

// 获取纠纷列表
const disputePage = (params) => axios.get(baseUrl + url.dispute.page, { params })

export default {
    disputeCreate,
    disputeDelete,
    disputeUpdate,
    disputeLoad,
    disputePage,
}
